import {ElementRef, HostListener, Directive} from '@angular/core'

@Directive({
    selector: 'ion-item[bgcc]'
})

export class BgcChange {

    @HostListener('mouseup',['$event.target'])
    onMouseup(item: HTMLDivElement): void {
        // console.log("BgcChange mouseup");
        this.element.nativeElement.classList.remove("item-mousedown");
        // console.log(this.element);
    }

    @HostListener('mousedown',['$event.target'])
    onMouseDown(item: HTMLDivElement): void {
        // console.log("BgcChange onMouseDown");
        this.element.nativeElement.classList.add("item-mousedown");
        // console.log(this.element);
    }

    constructor(public element: ElementRef){
    }

    ngOnInit(): void {
        // console.log("DateDisplay ngOnInit");
    }

    ngAfterContentInit(): void {
        // console.log("DateDisplay ngAfterContentInit");
    }

    ngAfterViewInit(): void {
        // console.log("DateDisplay ngAfterViewInit");
    }
}